Define CASE in SQL with its Syntax?
1266
23-Jul-2017
Updated on 19-Sep-2020
Sushant Mishra
23-Jul-2017In SQL CASE is used to provide if-then-else type of logic to SQL. It supports two formats, One is a Simple CASE expression, where we compare an expression to static values and the second is a Searched CASE expression, where we compare an expression to one or more logical conditions
Simple Case Expresseion Syntax
Searched case Expression Syntax